Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Protect wasm-smith against arbitrary Config differently #1825

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

alexcrichton
Copy link
Member

Currently Arbitrary for Config will perform some internal validation of options, such as if reference-types are disabled then gc is also disabled. This validation doesn't happen for other sources of Config though, such as CLI options or from manual configuration. This commit moves these checks from Arbitrary for Config to unconditionally happening during module creation. This fixes a panic where if reference types are disabled but tables are allowed then an internal assertion was tripped because GC types were used when they shouldn't be.

Currently `Arbitrary for Config` will perform some internal validation
of options, such as if reference-types are disabled then gc is also
disabled. This validation doesn't happen for other sources of `Config`
though, such as CLI options or from manual configuration. This commit
moves these checks from `Arbitrary for Config` to unconditionally
happening during module creation. This fixes a panic where if reference
types are disabled but tables are allowed then an internal assertion was
tripped because GC types were used when they shouldn't be.
@fitzgen fitzgen added this pull request to the merge queue Sep 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 25, 2024
@alexcrichton alexcrichton added this pull request to the merge queue Sep 25, 2024
Merged via the queue into bytecodealliance:main with commit 852ee35 Sep 25, 2024
30 checks passed
@alexcrichton alexcrichton deleted the fix-wasm-smith-panic branch September 25, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants